package com.pubinfo.passbook.common.model.http.eip;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * EIP登录用户信息
 *
 * @author zhouch
 * @date 2021/11/22 14:41
 */
@Data
@Accessors(chain = true)
public class UserInfo {
  
  @JSONField(name = "loginSourceName")
  private String loginSourceName; //登录其他用户的源账号
  @JSONField(name = "loginUserAcct")
  private String loginSourceAcct; //登录其他用户的源账号
  @JSONField(name = "userRoleId")
  private String userRoleId;
  
  @JSONField(name = "LoginName")
  private String username;
  
  @JSONField(name = "RealName")
  private String realname;
  
  @JSONField(name = "OrgId")
  private Long orgId;
  
  @JSONField(name = "Jthrloginname")
  private String jthrLoginName;
  
  @JSONField(name = "Smsterm")
  private String smsterm;
  
  @JSONField(name = "orgBizName")
  private String orgBizName;
  
  @JSONField(name = "RoleCode")
  private String roleCode;//角色代码
  // 公司代码
  @JSONField(name = "nsrsbn")
  private String nsrsbh;
  @JSONField(name = "userInfoSource")
  private String userInfoSource;
  
  public static UserInfo formStr(String userInfo) {
    return JSONObject.parseObject(userInfo, UserInfo.class);
  }
  
  @Override
  public String toString() {
    return JSONObject.toJSONString(this);
  }
  
}
